#load "list1.fs"
//#load "list3.fs"

open TupleExtensions
// Examples

//let m1 = Tuple.map string (Single 5)         // val t1 : Single<string> = Single "5"
let m2 = Tuple.map string (5,10)               // val t2 : string * string = ("5", "10")
let m3 = Tuple.map ((+)1) (5,10)               // val t3 : int * int * int = (6, 11)


let a1 = Tuple.(<*>) (string, fun (x:string)-> x.Length ) (4," world")   // val a1 : string * int = ("4", 6)
let inline a2 x = Tuple.(<*>) (string, (+) 10 ) x                        // val inline a2 :   ^a -> string * int ...

let v1 = Tuple.applySingle (string, (+) 1 ) 15   // val v1 : string * int = ("15", 16)
// let v2 = Tuple.applySingle (Single ( (+) 1 )) 20   // val v2 : Single<int> = Single 21

// let f1 = Tuple.fold (+) 0 (Single 5)           // val f1 : int = 5
let f2 = Tuple.fold (+) 0 (5,10)                  // val f2 : int = 15
let f3 = Tuple.fold (+) "" ("hello ","world")     // val f3 : string = "hello world"